package ${cfg.repositoryPackage};

import com.github.pagehelper.PageInfo;
import ${package.Entity}.${entity};
import java.util.List;

/**
 * ${table.comment!} 仓储接口
 *
 * @author ${author}
 * @since ${date}
 */
<#--获取主键字段-->
<#list table.fields as field>
    <#if field.keyFlag>
        <#assign primaryKey = field>
    </#if>
</#list>

public interface ${cfg.repositoryName} {

    PageInfo<${entity}> getPaged${cfg.entityName}List(int pageNum, int pageSize, String ${cfg.searchField});

    ${entity} get${cfg.entityName}ById(${primaryKey.propertyType} ${primaryKey.propertyName});

    boolean add${cfg.entityName}(${entity} record);

    boolean edit${cfg.entityName}(${entity} record);

    boolean delete${cfg.entityName}ByIds(List<${primaryKey.propertyType}> idList);
}


